import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		text: '默认状态',
		isLogin: false,
		noneMessage: true,
		cover: 'https://img.bosszhipin.com/boss/avatar/avatar_8.png',
		user: {
			// _id: '6572a3527ad52d3447c97603',
			_id: '',
			username: '',
			cover: 'https://img.bosszhipin.com/boss/avatar/avatar_16.png',
			sex: '男',
			age: '18',
			edu: '本科',
			school: '泉州师范学院',
			lastMessage: "",
			lastTime: "",
			sendMessage: ""
		},
		userList: [],
		Boss: [],
		Spark: {
			name: 'offer小助手',
			cover: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSfz3E2zK-f3S3rWHY24vEdhMzFkB2EtzioznvX9SKWUrxrq6qPdhUxTE5XRUHZiflH1po&usqp=CAU',
			lastMessage: 'ai助手',
			lastTime: ''
		},
		team: [{
			name: "",
			work: "副Code"
		},{
			name: "",
			work: "主Code"
		},  {
			name: "",
			work: "演讲者"
		}, ]
	},
	mutations: {
		onClass(state) {
			state.text = '上课中'
		},
		onExam(state) {
			state.text = '实验中'
		}
	},
	actions: {
		goClass(context) {
			context.commit('onClass')
		},
		goExam(context) {
			context.commit('onExam')
		}
	}
})

export default store